1. Field of the Invention
The present invention relates to a three-dimensional shape input device for measuring a three-dimensional shape of an object in a noncontact manner by a light projection method and entering the measurement result. More specifically, the present invention relates to a device that computes the three-dimensional shape by using an optimal parameter for each sectioned imaging area on an imaging surface.
2. Description of the Prior Art
In order to enter three-dimensional shape data of an object, a noncontact type three-dimensional shape input device is often used. This device projects detection light onto the object and receives reflected light from the object by an image sensor. This method is called a light projection method.
For example, in a slit light projection method (also called a light-section method), slit light having a slit-like cross section is used as the detection light that is projected, and the slit light is deflected so as to scan the object optically (see U.S. Pat. No. 6,141,105).
FIGS. 18(a)-18(d) show a general outline of the slit light projection method, and FIGS. 19(a)-19(c) show a principle of measurement by the slit light projection method.
In FIG. 18, slit light U is projected onto an object Q, and reflected light from the object Q enters the imaging surface S2 of the image sensor (FIG. 18(a)). If an irradiated part of the object Q is flat, an obtained image (a slit image) is a straight line (FIG. 18(b)). If the irradiated part has pits and projections, the line becomes a curved or step-like shape (FIG. 18(c)). Namely, a distance between the measuring device and the object Q is reflected in an incident position of the reflected light on the imaging surface S2 (FIG. 18(d)). When deflecting the slit light U in its width direction (the vertical direction in FIG. 18), the surface of the object Q is scanned so that sampling of three-dimensional positions is performed.
As shown in FIG. 19, a light projecting system and a light receiving system are positioned so that a base line AO that links a starting point A of the emitted light and a principal point O of a lens of the light receiving system becomes perpendicular to a light reception axis. The light reception axis is perpendicular to the imaging surface S2. Note that the principal point of a lens is a point (a rear principal point) that is away from the imaging surface S2 by an image distance b on the light reception axis when an image of a subject at a finite distance is formed on the imaging surface S2. Hereinafter, the image distance b may be referred to as an effective focal distance Freal.
The principal point O is regarded as the origin of a three-dimensional rectangular coordinate system. The light reception axis is the Z axis, the base line AO is the Y axis, and a lengthwise direction of the slit light is the X axis. θa represents an angle between a light projection axis and a light projection reference plane (a light projection plane that is parallel with the light reception axis), and θp represents an acceptance angle when the slit light U is projected onto a point P(X,Y,Z) on the object. Then, the coordinate Z of the point P can be expressed by the equation (1).The base line length L=L1+L2=Z tan θa+Z tan θpTherefore, Z=L/(tan θa+tan θp)  (1)
Note that the acceptance angle θp is the angle between the line that links the point P and the principal point O and a plane that includes the light reception axis (a light reception axis plane).
As an imaging magnification β=b/Z, the coordinates X and Y of the point P are expressed by the equations (2) and (3), when xp represents a distance between the center of the imaging surface S2 and a light receiving pixel in the X direction, and yp represents a distance between them in the Y direction (see FIG. 19(a)).X=xp/β  (2)Y=yp/β  (3)
The angle θa can be derived from an angular velocity of deflection of the slit light U. The acceptance angle θp can be derived from the relationship of the equation below.tan θp=b/yp
Namely, by measuring a position(xp,yp) on the imaging surface S2, the three-dimensional position of the point P can be determined in accordance with the angle θa.
In this way, the three-dimensional shape data according to the light projection method can be calculated relatively easily by using various parameters including camera parameters and light projecting optical system parameters and by applying a camera sight line equation and a detection light plane equation.
The above description is on the premise that an ideal thin lens system is used. In a real thick lens system, the principal point O is divided into a front principal point H and a rear principal point H′ as shown in FIG. 19(c).
In addition, there is known other light projection method in which spot light, step light or density pattern light is projected instead of the slit light. For example, Japanese Patent No. 2913021 discloses a device for entering three-dimensional shape data of an object by a pattern projection method. According to the method, space coordinates on the surface of an object Q is calculated from an image of a two-dimensional grid that is drawn on a reference plane, an image of a two-dimensional grid that is projected onto the reference plane, a three-dimensional image on the reference plane, and an image of a two-dimensional grid that is projected onto the object Q.
However, in the slit light projection method disclosed in U.S. Pat. No. 6,141,105, the three-dimensional shape data are calculated on the assumption that the cross section of the slit light is linear, namely, the slit light is a complete plane.
However, in each of the light projecting optical system and the light receiving optical system, an optical shape distortion occurs due to an aberration of a lens. For example, a shape distortion occurs in the slit light due to an aberration of a lens in the light projecting optical system. In addition, an image on the imaging surface S2 is distorted due to an aberration of a lens in the light receiving optical system. In particular, the distortion may often occur at a peripheral portion of the imaging surface S2.
In addition, a cross sectional shape of a laser beam that is projected from a semiconductor laser that is used as a light source is not a complete ellipse, and a cylindrical lens has an aberration. Therefore, the slit light becomes not a flat plane but a curved surface after the laser beam passes through the cylindrical lens.
Furthermore, there is a probability that the slit light is shifted from an ideal plane position because scanning angle is not linear to an input voltage of a galvanomirror for scanning the slit light.
Thus, real slit light and an image of received light are distorted for various reasons in the slit light projection method. For this reason, an error occurs in the obtained three-dimensional shape data, so that precise three-dimensional shape data cannot be obtained.
This problem occurs not only in the slit light projection method but also in other various light projection methods that project spot light, step light or pattern light.
Note that the device disclosed in the Japanese Patent No. 2913021 uses an image of a reference object for each pixel of the image sensor directly for calculating coordinates. As it does not use an optical system parameter, an error due to the parameter does not occur. But, in order to determine three-dimensional shape data with high degree of precision, it is necessary to project plural types of two-dimensional grid patterns and to determine a phase in each direction at high degree of precision by using a pattern coding method or a Fourier transformation phase shifting method. In addition, it is also necessary to draw the two-dimensional grid in different phases on the reference plane so as to determine phases in each direction precisely. Therefore, there is a tendency that the structure or contents of processes of devices become complicated or large scaled, and it is disadvantageous in cost.